import request from '@/request/request.js'

// 登录信息请求
export const getLoginInfo = (params) => request.post('/login', params)

// 侧边栏菜单权限请求
export const asideMenu = () => request.get('/menus')
// export const asideMenu = () => {
//   // 知道错误在哪里了   箭头函数要返回
//   return request.get('/menus')
// }

// 用户列表信息
export const userInfo = (params) => {
  return request.get('/users', { params })
}

// 用户状态改变
// export const userState = (params) => {
//   return request.put('users/:uId/state/type', { params })
// }

// 添加用户
export const addUser = (params) => request.post('/users', params)

// 根据id查询用户信息(传个对象)
// export const showUserInfo = (params) => request.get('/users', params)

// 编辑用户信息提交
// export const EditUser = (id, params) => request.put('/users' + '/' + id, params)

// 删除用户
export const DeleteUser = (id) => request.delete('users/' + id)
